<?php
/*
    Authors and license
	*/

	
include_once(dirname(__FILE__).'/./config/config.php');
include(dirname(__FILE__).'/./libraries/lang/'.$lang.'.php');

if(isset($_SESSION['logged'])) // user logged in?
{
	$id = $_SESSION['id']; // grab user id to sql querry
	
	$result = mysql_query("SELECT Steam_Id FROM Users WHERE Id='$id'")
		or die("Error in database!"); 
	
	$row = mysql_fetch_array($result); // convert $result to single $row
	$steam_id = $row['Steam_Id'];	
	
	if($steam_id=="") {
	echo '<a href="https://steamcommunity.com/openid/login?openid.ns=http://specs.openid.net/auth/2.0&openid.mode=checkid_setup&openid.return_to=http://xdota2.com/lib/steam/steam.php&openid.realm=http://xdota2.com&openid.ns.sreg=http://openid.net/extensions/sreg/1.1&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.identity=http://specs.openid.net/auth/2.0/identifier_select" style="margin:10px;"><img src="http://cdn.steamcommunity.com/public/images/signinthroughsteam/sits_large_noborder.png"></a>';
	} else {
echo '<img src="'.$biguseravatar.'" style="height:150px; width:150px; border:3px solid #949597; margin-right: 5px;">'; 
}
	
	return $user_data; // return table


}
?>